import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [{
    path: '/systemIndex',
    name: 'systemIndex',
    component: resolve => require(["views/systemIndex"], resolve),
    children: [{
      path: '/home',
      name: 'home',
      component: resolve => require(["views/home"], resolve)
    }, {
      path: '/personalCenter',
      name: 'personalCenter',
      component: resolve => require(["views/personalCenter"], resolve)
    }, {
      path: '/goodsDetail/:id',
      name: 'goodsDetail',
      component: resolve => require(["views/goodsDetail"], resolve)
    }, {
      path: '/shopMall',
      name: 'shopMall',
      component: resolve => require(["views/shopMall"], resolve)
    }]
  }, {
    path: '/authPage',
    name: 'authPage',
    component: resolve => require(["views/home/authPage"], resolve),
  }]
})
